﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using System.Configuration;

namespace Citi.OTFPC.WcfService
{
    public class Resource : IResource
    {
        public string ConnectionString
        {
            get 
            { 
                return ConfigurationManager.ConnectionStrings["ResourceEntities"].ToString();
            }
        }

        public Citi.OTFPC.Resource.Domain.Resource GetByName(string fullName)
        {
            var resource = new OTFPC.Resource.Domain.Resource(ConnectionString);
            return resource.GetByName(fullName);
            //return new OTFPC.Resource.Domain.Resource { FullName = "Nathan Guedini", Geid= 21321, Id=1, EmployeeClass= "gyg", SoeId ="asdas", Status="asda"  };

            //return new Citi.OTFPC.Resource.Domain.Resource().GetByName(fullName);
        }

        public string GetByName2(string fullName)
        {
            return "Oi";//new Citi.OTFPC.Resource.Domain.Resource().GetByName(fullName).FullName ;
        }
    }
}
